Pontifex Solitare Encryption Readme


The above applet is modeled after the Solitaire algorithm, also known as Pontifex in Neal Stephenson's book "Cryptonomicon". For a full explanation of the algorithm, go here: www.counterpane.com/solitaire.html.

To Use

To use this applet isn't complicated. First, input a passphrase at the top for the key. In the picture below, it is "This is my key." Now, type in the text you want to encrypt in the text area under the label plaintext. The example is "This is the plaintext to be coded." Now click "Encrypt" and the cyphertext will appear. Click "Decrypt" to see what the cyphertext will appear after decryption. As you can see, it too is in 5-letter blocks and has Xs at the end. But if you look carefully, the message is still there. Here is the output after decryption:

THISI STHEP LAINT EXTTO BECOD EDXXX

And here is the snapshot:

Implementation Notes

To implement the given applet, take all .class files and within the HTML file, have the following:

	<APPLET
		code	= "Pontifex_Solitaire.class"
		width	= "500"
		height	= "300"
		>
	</APPLET>

If you just want the needed classes to encrypt/decrypt, you will need all but Pontifex_Solitaire.class. My implementation has each class using another. You will use Coder only for your own coding and decoding with public String encrypt(String plaintext) and public String decrypt(String cyphertext). Coder uses Pontifex to get the keystream, Pontifex uses Deck to generate the keystream, and Deck uses Card.

The folder Pontifex_Solitaire contains the source code and notes I typed while making this applet. Besides the JDK, I used the JCreator IDE found here: www.jcreator.com.

Brian Ogan
sabre@famvid.com